package com.zy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author LittleDesire
 * @description
 * @date 2022-03-31 周四 12:11
 * @since 17
 */
@Controller
public class HomeController {
    @RequestMapping("home")@ResponseBody
    public String home(Integer id , String name, HttpServletRequest req) {
        return String.format("id: %d, name: %s, method: %s",id,name,req.getMethod());
    }
}
